package com.djx.dao;

import com.djx.domian.Book;
import org.apache.ibatis.annotations.*;

import java.util.List;
@Mapper
public interface BookDao {
    @Insert("insert into book (type,name,description) values(#{type},#{name},#{description})")
    public int save(Book book);
    @Update("update book set type = #{type}, name = #{name}, description = #{description} where id = #{id}")
    public int update(Book book);
    @Delete("delete from book where id = #{id}")
    public int delete(Integer id);
    @Select("select * from book")
    public List<Book> getAll();
}
